package com.jl.jlapp.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ShoppingCartModel;
import com.jl.jlapp.eneity.ShoppingCartModel.ResultDataBean.GoodsDetailsBean.GoodsActivitysBeanX;
import com.jl.jlapp.eneity.ShoppingCartModel.ResultDataBean.GoodsDetailsBean.GoodsActivitysBeanX.ActivityInformationBeanX;

import java.util.List;

public class ChoosGoodsActivityAdapter
        extends BaseQuickAdapter<GoodsActivitysBeanX, BaseViewHolder> {
    public ChoosGoodsActivityAdapter(int paramInt, @Nullable List<GoodsActivitysBeanX> paramList) {
        super(paramInt, paramList);
    }

    protected void convert(BaseViewHolder paramBaseViewHolder, GoodsActivitysBeanX paramGoodsActivitysBeanX) {
        switch (paramGoodsActivitysBeanX.getActivityInformation().getActivityType()) {

            case 0:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "折扣");
                paramBaseViewHolder.setText(R.id.activity_name, "打 " + paramGoodsActivitysBeanX.getActivityInformation().getDiscount() * 10.0D + " 折，最多可购买" + paramGoodsActivitysBeanX.getActivityInformation().getMaxNum() + "个");
                break;
            case 1:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "团购");
                paramBaseViewHolder.setText(R.id.activity_name, "团购单价为¥" + paramGoodsActivitysBeanX.getActivityInformation().getDiscount() + "，最多可购买" + paramGoodsActivitysBeanX.getActivityInformation().getMaxNum() + "个");
                break;
            case 2:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "秒杀");
                paramBaseViewHolder.setText(R.id.activity_name, "秒杀单价为¥" + paramGoodsActivitysBeanX.getActivityInformation().getDiscount() + "，最多可购买" + paramGoodsActivitysBeanX.getActivityInformation().getMaxNum() + "个");
                break;
            case 3:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "立减");
                paramBaseViewHolder.setText(R.id.activity_name, "购买可立减¥" + paramGoodsActivitysBeanX.getActivityInformation().getDiscount() + "，最多可购买" + paramGoodsActivitysBeanX.getActivityInformation().getMaxNum() + "个");
                break;

            default:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "满减");
                paramBaseViewHolder.setText(R.id.activity_name, "该商品满¥" + paramGoodsActivitysBeanX.getActivityInformation().getPrice() + "，可减¥" + paramGoodsActivitysBeanX.getActivityInformation().getDiscount());

                break;
        }
    }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/ChoosGoodsActivityAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */